package top.fwpsl.data;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

/**
 * @author 风戏fw
 */
public class Data {

    private static List<PersonModel> list = null;

    static {
        PersonModel song = new PersonModel("song jiang", 40, "男");
        PersonModel lu = new PersonModel("lu jun yi", 35, "男");
        PersonModel wu = new PersonModel("wu yong", 34, "男");
        PersonModel sun = new PersonModel("sun er niang", 38, "女");
        PersonModel hu = new PersonModel("hu san niang", 28, "女");
        list = Arrays.asList(song, lu, wu, sun, hu);
    }

    public static List<PersonModel> getDate() {
        return list;
    }

    public static List<PersonModel> getData2() {
        List<PersonModel> personModels = new ArrayList<>(list);
        Collections.copy(personModels, list);
        personModels.add(list.get(1));
        personModels.add(list.get(3));
        personModels.add(list.get(2));
        return personModels;
    }
}
